package cn.javass.dp.composite.example6;

public class Leaf extends Compoment {
    private String name = "";

    public Leaf(String name) {
        this.name = name;
    }

    @Override
    public String getName() {
        return this.name;
    }

    public void printStruct(String preStr) {
        System.out.println(" - " + this.name);
    }
}
